package iedcyt.acute.businessServices.endnote.RECNode;

import java.util.ArrayList;
import java.util.List;

import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

public class REC_Node extends SimpleNode {

	
	private String _inst_id = "";
	private String _recid = "";
	private String _hot = "";
	private String _sortkey = "";
	private String _timescited = "";
	private String _sharedrefs = "";
	private String _inpi = "";
	
	private UtNODE _ut = new UtNODE();
	private I_ckeyNODE _i_ckey = new I_ckeyNODE();
	private Source_titleNODE _source_title = new Source_titleNODE();
	private Source_seriesNODE _source_series = new Source_seriesNODE();
	

	private Source_abbrevNODE _source_abbrev = new Source_abbrevNODE();
	private Item_titleNODE _item_title = new Item_titleNODE();
	private Bid_idNODE _bib_id = new Bid_idNODE();
	
	private Bib_issueNODE _bib_issue = new Bib_issueNODE();
	private DoctypeNODE _doctype = new DoctypeNODE();
	private EditionsNODE _editions = new EditionsNODE();
	private LanguagesNODE _languages = new LanguagesNODE();
	private AuthorsNODE _authors = new AuthorsNODE();
	private EmailsNODE _emails = new EmailsNODE();
	private Keywords_plusNODE _keywords_plus = new Keywords_plusNODE();
	private KeywordsNODE _keywords = new KeywordsNODE();
	private ReprintNODE _reprint = new ReprintNODE();
	private Research_addrsNODE _research_addrs = new Research_addrsNODE();
	private AbstractNODE _abstract = new AbstractNODE();
	private RefsNODE _refs = new RefsNODE();
	private CategoriesNODE _categories = new CategoriesNODE();
	private HeadingsNODE _headings = new HeadingsNODE();
	private IssnNODE _issn = new IssnNODE();
	private IdsNODE _ids = new IdsNODE();
	private Issue_titleNODE _issue_title = new Issue_titleNODE();
	private Abbrev_22NODE _abbrev_22 = new Abbrev_22NODE();
	private Book_seriesNODE _book_series = new Book_seriesNODE();
	private CopyrightNODE _copyright = new CopyrightNODE();
	private Bib_volNODE _bib_vol = new Bib_volNODE();
	private Bib_dateNODE _bib_date = new Bib_dateNODE();
	private PubtypeNODE _pubtype = new PubtypeNODE();
	private SubjectsNODE _subjects = new SubjectsNODE();
	//private List<Book_subtitleNODE> _book_subtitleList = new ArrayList<Book_subtitleNODE>();
	private List<Bib_pagesNODE> _bib_pagesList = new ArrayList<Bib_pagesNODE>();
	
	
	private Article_nosNODE _article_nos = new Article_nosNODE();
	
	private Corp_authorsNODE _corp_authors = new Corp_authorsNODE();
	private Reviewed_workNODE _reviewed_work = new Reviewed_workNODE();
	
	public REC_Node() {
		_nodeName = "REC";
		
	}
	
	@Override
	protected void extractElementAttributes(Node node) {
		Element element = (Element)node;
		
		_inst_id = element.getAttribute("inst_id");
		_recid = element.getAttribute("recid");
		_hot = element.getAttribute("hot");
		_sortkey = element.getAttribute("sortkey");
		_timescited = element.getAttribute("timescited");
		_sharedrefs = element.getAttribute("sharedrefs");
		_inpi = element.getAttribute("inpi");
		
	}
	
	public String get_inst_id() {
		return _inst_id;
	}

	public String get_recid() {
		return _recid;
	}

	public String get_hot() {
		return _hot;
	}

	public String get_sortkey() {
		return _sortkey;
	}

	public String get_timescited() {
		return _timescited;
	}

	public String get_sharedrefs() {
		return _sharedrefs;
	}

	public String get_inpi() {
		return _inpi;
	}

	public UtNODE get_ut() {
		return _ut;
	}

	public I_ckeyNODE get_i_ckey() {
		return _i_ckey;
	}

	public Source_titleNODE get_source_title() {
		return _source_title;
	}

	
	public Source_abbrevNODE get_source_abbrev() {
		return _source_abbrev;
	}

	public Item_titleNODE get_item_title() {
		return _item_title;
	}

	public Bid_idNODE get_bib_id() {
		return _bib_id;
	}

	public Bib_issueNODE get_bib_issue() {
		return _bib_issue;
	}

	public DoctypeNODE get_doctype() {
		return _doctype;
	}

	public EditionsNODE get_editions() {
		return _editions;
	}

	public LanguagesNODE get_languages() {
		return _languages;
	}

	public AuthorsNODE get_authors() {
		return _authors;
	}
	
	public EmailsNODE get_emails() {
		return _emails;
	}

	public KeywordsNODE get_keywords() {
		return _keywords;
	}
	

	public Keywords_plusNODE get_keywords_plus() {
		return _keywords_plus;
	}

	public ReprintNODE get_reprint() {
		return _reprint;
	}

	public Research_addrsNODE get_research_addrs() {
		return _research_addrs;
	}

	public AbstractNODE get_abstract() {
		return _abstract;
	}

	public RefsNODE get_refs() {
		return _refs;
	}

	public CategoriesNODE get_categories() {
		return _categories;
	}

	public HeadingsNODE get_headings() {
		return _headings;
	}

	public IssnNODE get_issn() {
		return _issn;
	}

	public IdsNODE get_ids() {
		return _ids;
	}

	public Issue_titleNODE get_issue_title() {
		return _issue_title;
	}

	public Abbrev_22NODE get_abbrev_22() {
		return _abbrev_22;
	}

	
	public CopyrightNODE get_copyright() {
		return _copyright;
	}

	public Bib_volNODE get_bib_vol() {
		return _bib_vol;
	}

	public Bib_dateNODE get_bib_date() {
		return _bib_date;
	}

	public PubtypeNODE get_pubtype() {
		return _pubtype;
	}

	public SubjectsNODE get_subjects() {
		return _subjects;
	}

	public Article_nosNODE get_article_nos() {
		return _article_nos;
	}

	

	public Corp_authorsNODE get_corp_authors() {
		return _corp_authors;
	}

	public Reviewed_workNODE get_reviewed_work() {
		return _reviewed_work;
	}


	public List<Bib_pagesNODE> get_bib_pagesList() {
		return _bib_pagesList;
	}
	
	public Source_seriesNODE get_source_series() {
		return _source_series;
	}

	public Book_seriesNODE get_book_series() {
		return _book_series;
	}

	/**
	 * A partir de un nodo XML rellena todos los elementos parseados
	 * @param node
	 */
	@Override
	protected void extractElementSubNodes(Node node) {
		
		_ut.extractNodeInformation(node);
		_i_ckey.extractNodeInformation(node);
		_source_title.extractNodeInformation(node);
		_source_series.extractNodeInformation(node);
		_source_abbrev.extractNodeInformation(node);
		_item_title.extractNodeInformation(node);
		_bib_id.extractNodeInformation(node);
		_bib_issue.extractNodeInformation(node);
		_doctype.extractNodeInformation(node);
		_editions.extractNodeInformation(node);
		_languages.extractNodeInformation(node);
		_authors.extractNodeInformation(node);
		_emails.extractNodeInformation(node);
		_keywords_plus.extractNodeInformation(node);
		_keywords.extractNodeInformation(node);
		_reprint.extractNodeInformation(node);
		_research_addrs.extractNodeInformation(node);
		_abstract.extractNodeInformation(node);
		_refs.extractNodeInformation(node);
		
		_categories.extractNodeInformation(node);
		_headings.extractNodeInformation(node);
		_issn.extractNodeInformation(node);
		_ids.extractNodeInformation(node);
		_issue_title.extractNodeInformation(node);
		_abbrev_22.extractNodeInformation(node);
		_book_series.extractNodeInformation(node);
		_copyright.extractNodeInformation(node);
		_bib_vol.extractNodeInformation(node);
		_bib_date.extractNodeInformation(node);
		_pubtype.extractNodeInformation(node);
		_subjects.extractNodeInformation(node);
		
		_article_nos.extractNodeInformation(node);
		
		_corp_authors.extractNodeInformation(node);
		_reviewed_work.extractNodeInformation(node);
		

		Element elmnt = (Element)node;
	/*	NodeList cat_nodes =  elmnt.getElementsByTagName("book_subtitles");
		for (int i = 0; i < cat_nodes.getLength(); i++)
		{
			//Book_subtitleNODE catNode = new Book_subtitleNODE();
			//catNode.extractNodeInformation(node,i);
			//_book_subtitleList.add(catNode);
		}
	*/	
		NodeList bP_nodes =  elmnt.getElementsByTagName("bib_pages");
		for (int i = 0; i < bP_nodes.getLength(); i++)
		{
			Bib_pagesNODE catNode = new Bib_pagesNODE();
			catNode.extractNodeInformation(node,i);
			_bib_pagesList.add(catNode);
		}
		
	}
	
	
		
}
